]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
cleanup: Avoid unnecessary parentheses in arrow functions
authorFlorian Müllner <fmuellner@gnome.org>
Sat, 14 Sep 2019 15:02:29 +0000 (17:02 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Sun, 15 Sep 2019 14:02:45 +0000 (16:02 +0200)
Parentheses are only needed if there are zero or multiple arguments.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/731

js/misc/systemActions.js
js/ui/altTab.js
js/ui/calendar.js
js/ui/popupMenu.js
js/ui/runDialog.js
js/ui/windowManager.js
js/ui/windowMenu.js

index 3f0b2ec980e86c7b6eb89ff8df0b1832ec1b97d7..7607efc65f6485024ffdc41717b215ef76b4179c 100644 (file)
@@ -269,7 +269,7 @@ const SystemActions = GObject.registerClass({
 
     getMatchingActions(terms) {
         // terms is a list of strings
-        terms = terms.map((term) => term.toLowerCase());
+        terms = terms.map(term => term.toLowerCase());
 
         let results = [];
 
index 46f4ed912cc00cbb40373e9f0425097ba0a7ab62..4cf18e672d99ce7732b7374a50d11eb055f816e3 100644 (file)
@@ -1043,7 +1043,7 @@ class WindowList extends SwitcherPopup.SwitcherList {
             this.addItem(icon, icon.label);
             this.icons.push(icon);
 
-            icon._unmanagedSignalId = icon.window.connect('unmanaged', (window) => {
+            icon._unmanagedSignalId = icon.window.connect('unmanaged', window => {
                 this._removeWindow(window);
             });
         }
index 797558ffa54a3b84929555b07c512b32f64339e8..88e008e2cd9b2adbaa23fb27efb4e54a83f977de 100644 (file)
@@ -1073,7 +1073,7 @@ var CalendarMessageList = class CalendarMessageList {
         this._clearButton.set_x_align(Clutter.ActorAlign.END);
         this._clearButton.connect('clicked', () => {
             let sections = [...this._sections.keys()];
-            sections.forEach((s) => s.clear());
+            sections.forEach(s => s.clear());
         });
         box.add_actor(this._clearButton);
 
index de642e5a41c45fb3f3eefbfc87061174f6a3bc95..b66f3c5d1e5c48fc716fd434a22810bcc6f9294c 100644 (file)
@@ -549,7 +549,7 @@ var PopupMenuBase = class {
     }
 
     _connectItemSignals(menuItem) {
-        menuItem._activeChangeId = menuItem.connect('notify::active', (menuItem) => {
+        menuItem._activeChangeId = menuItem.connect('notify::active', menuItem => {
             let active = menuItem.active;
             if (active && this._activeMenuItem != menuItem) {
                 if (this._activeMenuItem)
index ea81047658c8162ff9d4bd45453325bb3627c1d2..32545590ca87df53e3d1aba56a29c4d40e3bd98b 100644 (file)
@@ -104,7 +104,7 @@ class RunDialog extends ModalDialog.ModalDialog {
 
         this._history = new History.HistoryManager({ gsettingsKey: HISTORY_KEY,
                                                      entry: this._entryText });
-        this._entryText.connect('activate', (o) => {
+        this._entryText.connect('activate', o => {
             this.popModal();
             this._run(o.get_text(),
                       Clutter.get_current_event().get_state() & Clutter.ModifierType.CONTROL_MASK);
index 3df1cd50836789af6d00714728df8ce37e6b8f41..8d5db083bfae4c7cf54866b3f0988d64e2f771cf 100644 (file)
@@ -713,7 +713,7 @@ var WindowManager = class {
         this._isWorkspacePrepended = false;
 
         this._switchData = null;
-        this._shellwm.connect('kill-switch-workspace', (shellwm) => {
+        this._shellwm.connect('kill-switch-workspace', shellwm => {
             if (this._switchData) {
                 if (this._switchData.inProgress)
                     this._switchWorkspaceDone(shellwm);
index f2fb750bcb0a10a0f0e14ec69c4ce8d64a93c7ec..bb6a8df7b1a33f7d40253da75db48d7b6d293e6d 100644 (file)
@@ -178,7 +178,7 @@ var WindowMenu = class extends PopupMenu.PopupMenu {
         }
 
         let waitId = 0;
-        let id = global.display.connect('grab-op-end', (display) => {
+        let id = global.display.connect('grab-op-end', display => {
             display.disconnect(id);
             GLib.source_remove(waitId);